package com.smzd.ccms.dao;


import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.smzd.ccms.domain.SiteChannelConfig;
import com.smzd.ccms.mappers.SiteChannelConfigMapper;
import com.smzd.core.dao.AbstractDao;
import com.smzd.core.mappers.IMapper;

@Component
public class SiteChannelConfigDao extends AbstractDao<SiteChannelConfig> {
    @Autowired
    private SiteChannelConfigMapper mapper;
    
    @Override
    protected IMapper<SiteChannelConfig> getMapper() {
        return mapper;
    }

	public SiteChannelConfig getSiteChannelConfig(int meetingId, int dictId) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("meetingId", meetingId);
		params.put("dictId", dictId);
		return mapper.getSiteChannelConfig(params);
	}

	public SiteChannelConfig getSiteChannelConfig(int meetingId, int dictId, int channelId) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("meetingId", meetingId);
		params.put("dictId", dictId);
		params.put("channelId", channelId);
		return mapper.getSiteChannelConfig1(params);
	}

	public void toggleDisabled(SiteChannelConfig schcfg) {
		mapper.toggleDisabled(schcfg);
	}
}